import QtQuick 2.2
import QtQuick.Window 2.1

Window {
    visible: true
    width: 360
    height: 360

    Rectangle {
        id: rect1;
        anchors.fill: parent;
        focus: true;
        Keys.onBackPressed: {
            console.log("rect1");
        }
        Keys.forwardTo: [text1, rect2];

        Rectangle {
            id: rect2;
            Keys.onSpacePressed: {
                console.log("rect2");
            }
        }

        Text {
            id: text1;
            Keys.onTabPressed: {
                console.log("text1");
            }
        }
    }
}
